import React from 'react'
import * as icons from '@ant-design/icons'
import Icon from '@ant-design/icons'

function IconComp(props: {icon: string}) {
	const {icon} = props
  const iconoscope: any = icons
	if (icon) {
		const component = iconoscope[icon]
		return <Icon component={component} />
	}
	return <Icon component={iconoscope.AccountBookFilled} />
}

export default IconComp
